package com.codeoss.framework.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.codeoss.framework.context.UserContext;
import com.codeoss.framework.response.MMainResponse;
import com.codeoss.framework.service.IMMainService;
import com.codeoss.module.res.model.ResUser;
import com.codeoss.module.res.service.IResUserService;

@Service
public class MMainService implements IMMainService {
	@Autowired
	private IResUserService resUserService;
	@Override
	public MMainResponse init() {
		// TODO Auto-generated method stub
		MMainResponse mMainResponse=new MMainResponse();
		UserContext userContext=UserContext.getCurrentUserContext();
		ResUser resUser=resUserService.getById(userContext.getResUserId());
		mMainResponse.setMobileDashboardPage(resUser.getMobileDashboardPage());
		return mMainResponse;
	}

}
